#! /usr/bin/python

#site instructions: https://sites.google.com/site/2011cssimaterials/handouts/data-structures-and-functions

def GetUniqueWords(text):
  word_list=[]
  uniqueWord_list = []
  frequencyWord_list = []
  word_list = text.replace("-", " ").replace(".", " ").replace(",", " ").replace("!", " ").replace("?"," ").replace("]"," ").replace("["," ").replace(";"," ").replace(")","").replace("(","").replace(",","").replace("'","").replace(":","").replace("\"","").lower().strip().split()
  for word in word_list:
    if uniqueWord_list.__contains__(word):
      frequencyWord_list.append(word)
    else:
      uniqueWord_list.append(word)
  return len(uniqueWord_list)

def GetFrequency():
  frequencyDict = {}
  for i in range(len(frequencyWord_list) - 1):
    frequency_Dict[i] = frequencyWord_list[i]

def main():
  # Open the file, read it into memory as a single string.
  with open('alice_in_wonderland.txt') as alice_file:
    alice_text = alice_file.read()

  print 'Unique words:', GetUniqueWords(alice_text)


if __name__ == '__main__':
  main()
